home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Focus for Success
/
Focus for Success.iso
/
pc
/
game2.dxr
/
00089_Field_Script playbonus g2.txt
< prev
next >
Wrap
Text File
|
1995-02-28
|
3KB
|
93 lines
on mouseUp
put "bonus" into theSoundName --we stick the actual sound name into "putSoundNameHere"
if the CommandKey is "down" then
answer "Are you sure you want to delete" && quote & theSoundName & quote & "?"Â --Æ
with "No" or "Yes" --Æ
if it is "Yes" then --Æ
set cursor to watch
deleteMe
exit mouseUp
end if
set the hilite of me to false
else
if ":Audio Help" & return is in the stacksInUse & return then --Æ
if not SndExists(theSoundName) then
answer "The sound associated with this button has been deleted."&&Â --Æ
" Would you like to delete the button as well?"Â --Æ
with "No" or "Yes" --Æ
if it is "Yes" then deleteMe --Æ
set the hilite of me to false
exit mouseUp
end if
end if
play theSoundName
if the sound is not theSoundName then
answer "Sound" && quote & theSoundName & quote && "cannot be played." --Æ
set the hilite of me to false
exit mouseUp
end if
repeat until the sound is done
if the mouse is down then play stop
end repeat
set the hilite of me to false
end if
end mouseUp
on mouseDown
if the OptionKey is down then
repeat until the mouse is up
set the loc of me to the mouseloc
end repeat
get the rect of this card
if the loc of me is not within it then
put the height of this card div 2 into vert
put the width of this card div 2 into hor
set the loc of me to hor,vert
end if
exit to hypercard
else
put false into OldState
put true into NewState -- in case the click was really fast
repeat until the mouse is up
put the mouseLoc is within the rect of me into NewState
if NewState ­ OldState then
set the hilite of me to NewState
put NewState into OldState
end if
end repeat
if not NewState then
set hilite of me to false
exit to hypercard
end if
end if
end mouseDown
on deleteMe
global APHasEdit,APHasWaveEdit
put the short name of me into btnName
put the long name of this stack into stakName
delete the first word of btnName
delete the first word of stakName
delete the first char of stakName
delete the last char of stakName
lock screen
if APHasEdit is true then
if APHasWaveEdit is true then put "Clear" into menuItem 6 of menu 3 --Æ
send "tempGiveUpEdit" to window "AudioPalette"
end if
get the userlevel
set the userlevel to 5
select me
send "doMenu Clear Button" to HyperCard
choose browse tool
set the userlevel to it
if APHasEdit is true then
if APHasWaveEdit is true then put "Clear Sound" into menuitem 6 of menu 3 --Æ
send "tempTakeBackEdit" to window "AudioPalette"
end if
unlock screen
if ":Audio Help" & return is in the stacksInUse & return --Æ
then deleteSnd stakName, btnName
if there is a window "AudioPalette" then send "update" to window "AudioPalette"
end deleteMe